<template>
    <view>
		<image class="faceCheck" mode="widthFix" src="https://img.zcool.cn/community/01d32e5dd39d7fa8012053c0a9791b.gif"></image>
		<button open-type="getUserInfo" @getuserinfo="hendleGetUserInfo">授权支付</button>

	</view>
</template>

<script>

	export default {
        methods:{
			hendleGetUserInfo(e){
				// const {encryptedData,iv,rawData,signayture} = e.detail;
				// const {code}=uni.login({
						// timeout: 10000,
						// success :(result)=>{
						// 	resolve(result);
						// },
						// fail :(res)=>{
						// 	reject(res);
						// }
						// }); 
				// const {loginParams} ={encryptedData,iv,rawData,signayture};
				//没有企业级账号，拿不到token
				// const {token} = await request({url:"/users/wxlogin",data:loginParams,method:"post"});
				const token =1;
				uni.setStorageSync('token', token);
				uni.navigateBack({
				delta: 1,
				})
       
   			},
		}
		
	}
</script>

<style lang="scss">
	.faceCheck{
		margin-top:30rpx;
		width: 80%;
		padding-left: 135rpx;
	}
	button{
		margin-top:30rpx;
    	width: 50%; 
		background-color: var(--themeColor);
		color: #fff;
	}
</style>